<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <div>
        <ul class="uu">

            <li>zhangtong</li>
            <li>jay</li>

            </ul>
            <button id="btn1">点我</button>
        </div>

    
</body>

<script>

    var btn=document.getElementById("btn1")
    btn.onclick=function(){
        var uu=document.getElementsByClassName("uu")
        var fl=uu.firstChild;
        alert(fl)
    }


    var arr=["小黑","迪迦奥特曼",{name:"小怪兽",age:"13"}]

    // arr.forEach((item,index)=>{
    //     console.log(item ,index)
    //     // console.log(index)
    // })
    // arr.forEach(function(item,index){
    //     console.log(item,index)
    // })
   var arrR= arr.filter((item)=>{
        return item=="小黑"
    })
        console.log(arrR)


</script>
</html>